56
Example A: Functions
Rectangle: Click to edit Master text styles
Second level
Third level
Fourth level
Fifth level
void Computer::setspeed(int p)
{ //To define a function outside put the name of the function
  // after the return type and then two colons, and then the
  // name of the function.
processorspeed = p;
}
int Computer::readspeed()
{ //The two colons simply tell the compiler that the function is
   // part of the class
return processorspeed;
}